﻿using System;
using System.Collections.Generic;
using Model;
namespace BLL
{
    #region class Bluqu
    /// <summary>
    /// Interface:luqu Interface
    /// Author:wxc
    /// DateTime:2021/5/29 14:21:26
    /// </summary>	
    public class Bluqu
    {
        #region Add Method
        /// <summary>
        /// Insert an item
        /// </summary>
        /// <param name="luqu"></param>
        /// <returns>count of rows affected</returns>
        public int Addluqu(luquEntity luqu)
        {
            DAL.DALluqu dal = new DAL.DALluqu();
            return dal.Addluqu(luqu);
        }
        #endregion
        #region Mod Method
        /// <summary>
        /// Update an item
        /// </summary>
        /// <param name="luqu"></param>
        /// <returns>count of rows affected</returns>
        public int Modluqu(luquEntity luqu)
        {
            DAL.DALluqu dal = new DAL.DALluqu();
            return dal.Modluqu(luqu);
        }
        #endregion
        #region Del Method
        /// <summary>
        /// Del an item by primary key
        /// </summary>
        /// <param name="id"></param> 
        /// <returns>count of rows affected</returns>
        public int Delluqu(string id)
        {
            DAL.DALluqu dal = new DAL.DALluqu();
            return dal.Delluqu(id);
        }
        #endregion
        #region Select Method
        /// <summary>
        /// Select an item by Primarykey
        /// </summary>
        /// <param name="id"></param>
        /// <returns>an item</returns>
        public luquEntity Getluqu(string id)
        {
            DAL.DALluqu dal = new DAL.DALluqu();
            return dal.Getluqu(id);
        }
        #endregion
        #region Select_All Method
        /// <summary>
        /// Select all items
        /// </summary>
        /// <returns>items</returns>
        public IList<luquEntity> Getluqus()
        {
            DAL.DALluqu dal = new DAL.DALluqu();
            return dal.Getluqus();
        }
        #endregion
        #region public common select by conditions ,we can use it by changing the GetluqusbyCondition(datatype condition) and sql
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<luquEntity> GetluqusbyCondition(string sql)
        {
            DAL.DALluqu dal = new DAL.DALluqu();
            return dal.GetluqusbyCondition(sql);
        }
        #endregion
        #region Select items Top n
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<luquEntity> GetluqusTopN(int n)
        {
            DAL.DALluqu dal = new DAL.DALluqu();
            return dal.GetluqusTopN(n);
        }
        #endregion
    }
    #endregion
}
